<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        #box {
            width: 200px;
            height: 200px;
            background-color: aqua;
        }
    </style>
</head>
<body>
<div id="box"></div>
<script>
    var box = document.getElementById("box");
//    box.onclick = function(){
//        console.log("被点击啦");
//    }
//    box.click = function(){
//        console.log("鼠标经过我啦");
//    }

    box.addEventListener("click", function () {
        console.log("被点击啦");
    })
    box.addEventListener("click", function () {
        console.log("鼠标经过我啦");
    })
</script>
</body>
</html>